<!DOCTYPE html>
<html class="x-admin-sm">

    <head>
        <meta charset="UTF-8">
        <title>欢迎页面-X-admin2.2</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="css/font.css">
        <link rel="stylesheet" href="css/xadmin.css">
        <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
        <script type="text/javascript" src="lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="js/xadmin.js"></script>
        <script type="text/javascript" src="js/xcity.js"></script>
        <script type="text/javascript" src="js/tableAdd.js"></script>
        <style type="text/css" media="screen">
            .layui-form-label-small {
                float: left;
                padding-top: 9px;
                font-weight: 400;
                line-height: 20px;
                color: #F08080;
        </style>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
            <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
            <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]--></head>
    <body>
        <div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">首页</a>
                <a href="">演示</a>
                <a>
                    <cite>导航元素</cite></a>
            </span>
            <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
                <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
            </a>
        </div>

        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body ">
                            <form class="layui-form" action="" lay-filter="firstTable">
                                <input type="text" id="tableId" name="tableId" hidden>
                                <input type="text" id="modeId" name="modeId" hidden>
                                <input type="text" id="actionId" name="actionId" value="0" hidden>
                                <div class="table_1">
                                    <span style="font-size: 16px; color: #0000CD;">表格1</span>
                                    <div class="layui-form-item" style="padding-top: 10px;">
                                        <label class="layui-form-label">
                                            <span class="x-red">*</span>项目名称</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="projectName" required class="layui-input"></div></div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">
                                            <span class="x-red">*</span>客户名称</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="businessName" required class="layui-input"></div></div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">
                                            <span class="x-red">*</span>客户项目负责人信息</label>
                                        <div class="layui-input-inline" style="width: 220px;">
                                            <span class="layui-form-label-small">姓名&nbsp;&nbsp;</span>
                                            <input type="text" name="chiefName" class="layui-input" style="width: 160px;"></div>
                                        <div class="layui-input-inline" style="width: 220px;">
                                            <span class="layui-form-label-small">电话&nbsp;&nbsp;</span>
                                            <input type="text" name="chiefPhone" class="layui-input" lay-verify="phone" style="width: 160px;"></div>
                                        <div class="layui-input-inline" style="width: 240px;">
                                            <span class="layui-form-label-small">邮箱&nbsp;&nbsp;</span>
                                            <input type="text" name="chiefEmail" class="layui-input" lay-verify="email"  style="width: 160px;"></div></div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">
                                            <span class="x-red">*</span>交付时间、地点</label>
                                        <div class="layui-input-inline" style="width: 220px;">
                                            <span class="layui-form-label-small">时间&nbsp;&nbsp;</span>
                                            <input type="layui-input" placeholder="截止日" id="deadline" name="deadline" class="layui-input" style="width: 160px;"></div>
                                        <div class="layui-input-inline" style="width: 850px;">
                                            <div class="layui-form-item x-city" id="site">
                                            <span class="layui-form-label-small">地点&nbsp;&nbsp;</span>
                                                <div class="layui-input-inline" style="width: 100px;">
                                                    <select name="province" id="province" lay-filter="province">
                                                        <option value="" >请选择省</option></select></div>
                                                <div class="layui-input-inline" style="width: 100px;">
                                                    <select name="city" id="city" lay-filter="city">
                                                        <option value="">请选择市</option></select> </div>
                                                <div class="layui-input-inline" style="width: 100px;">
                                                    <select name="area" id="area" lay-filter="area">
                                                        <option value="">请选择县/区</option></select></div>
                                                <input type="text" class="layui-input" id="street" name="street" style="width: 250px;" placeholder="请输入具体地点"></div></div></div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label"><span class="x-red">*</span>交付内容</label>
                                        <div class="layui-input-inline" style="width: 260px;">
                                            <input type="text" name="content" class="layui-input"></div></div>
                                    <div class="layui-form-item" >
                                        <label class="layui-form-label"><span class="x-red">*</span>交付方式</label>
                                        <div class="layui-input-inline" style="width: 260px;">
                                            <input type="text" name="method" class="layui-input"></div></div>
                                    <div class="layui-form-item" style="padding-left: 20px;">
                                        <div class="layui-btn-group">
                                        <button class="layui-btn layui-btn-lg" type="submit" lay-filter="btn-submit" lay-submit="">保存</button>
                                        <button class="layui-btn layui-btn-lg layui-btn-primary" type="reset">重置</button></div></div>
                                    <hr style="height:1px; color: #C0C0C0;" /></div></form>
                                <div class="table_2">
                                    <span style="font-size: 16px; color: #0000CD ;">表格2</span>
                                    <span style="font-size: 16px; color: Chocolate;">（项目开发人员安排计划）</span>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="" style="padding-top: 10px;">
                                            <span class="x-red">* 若板块无可填项（详情见合同模板），则无法填写该模板</span></label></div>
                                    <div class="layui-form-item-small" style="margin-bottom: 5px;">
                                        <label class="layui-form-label" style="padding-top: 10px;">
                                            <span style="font-size: 15px; color: green ;">工作内容</span></label></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">需求调研</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_2_1_1" onclick="btn_2_1_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_2_1_2" onclick="btn_2_1_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">系统设计</label></span>
                                        <button class="layui-btn layui-btn-normal"  id="btn_2_2_1" onclick="btn_2_2_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn"  id="btn_2_2_2"  onclick="btn_2_2_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">系统开发</label></span>
                                        <button class="layui-btn layui-btn-normal"  id="btn_2_3_1" onclick="btn_2_3_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_2_3_2"  onclick="btn_2_3_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">系统测试</label></span>
                                        <button class="layui-btn layui-btn-normal"  id="btn_2_4_1" onclick="btn_2_4_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn"  id="btn_2_4_2"  onclick="btn_2_4_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">业务支撑</label></span>
                                        <button class="layui-btn layui-btn-normal"  id="btn_2_5_1" onclick="btn_2_5_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn"  id="btn_2_5_2" onclick="btn_2_5_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">系统实施</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_2_6_1" onclick="btn_2_6_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_2_6_2"  onclick="btn_2_6_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">项目管理</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_2_7_1" onclick="btn_2_7_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_2_7_2" onclick="btn_2_7_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">技术管理</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_2_8_1" onclick="btn_2_8_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_2_8_2"  onclick="btn_2_8_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <hr style="height:1px; color: #C0C0C0;" /></div>
                                <div class="table_3">
                                    <span style="font-size: 16px; color: #0000CD ;">表格3</span>
                                    <span style="font-size: 16px; color: Chocolate;">（搭建平台架构价格明细表）</span>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="" style="padding-top: 10px;">
                                            <span class="x-red">* 若板块无可填项（详情见合同模板），则无法填写该模板</span></label></div>
                                    <div class="layui-form-item-small" style="margin-bottom: 5px;">
                                        <label class="layui-form-label" style="padding-top: 10px;">
                                            <span style="font-size: 15px; color: green ;">基础平台搭建</span></label></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">岗位投入</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_3_1_1_1" onclick="btn_3_1_1_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_3_1_1_2" onclick="btn_3_1_1_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">核心功能</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_3_1_2_1" onclick="btn_3_1_2_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_3_1_2_2" onclick="btn_3_1_2_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <hr style="height:1px; color: #C0C0C0;" /></div>
                                <div class="table_4">
                                    <span style="font-size: 16px; color: #0000CD ;">表格4</span>
                                    <span style="font-size: 16px; color: Chocolate;">（软件开发价格明细表）</span>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="" style="padding-top: 10px;">
                                            <span class="x-red">* 若板块无可填项（详情见合同模板），则无法填写该模板</span></label></div>
                                    <div class="layui-form-item-small" style="margin-bottom: 5px;">
                                        <label class="layui-form-label" style="padding-top: 10px;">
                                            <span style="font-size: 15px; color: green ;">应用层</span></label></div>
                                    <div class="layui-form-item" style="margin-bottom: 10px;">
                                        <label for="username" style="color: #F08080; padding-left: 15px;">小程序端</label></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">岗位投入</label></span>
                                        <button class="layui-btn layui-btn-normal"  id="btn_4_1_1_1" onclick="btn_4_1_1_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_1_1_2" onclick="btn_4_1_1_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">核心功能</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_1_2_1" onclick="btn_4_1_2_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_1_2_2" onclick="btn_4_1_2_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button>
                                        <li id="app_upload"></li></div>
                                    <div class="layui-form-item" style="margin-bottom: 10px;">
                                        <label for="username" style="color: #F08080; padding-left: 15px;">H5端</label></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">岗位投入</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_2_1_1" onclick="btn_4_2_1_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_2_1_2" onclick="btn_4_2_1_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">核心功能</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_2_1_1" onclick="btn_4_2_1_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_2_2_2" onclick="btn_4_2_2_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button>
                                        <li id="app_upload"></li></div>
                                    <div class="layui-form-item" style="margin-bottom: 10px;">
                                        <label for="username" style="color: #F08080; padding-left: 15px;">客户端app</label></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">岗位投入</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_3_1_1" onclick="btn_4_3_1_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_3_1_2" onclick="btn_4_3_1_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">核心功能</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_3_2_1" onclick="btn_4_3_2_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_3_2_2" onclick="btn_4_3_2_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button>
                                        <li id="app_upload"></li></div>
                                    <div class="layui-form-item" style="margin-bottom: 10px;">
                                        <label for="username" style="color: #F08080; padding-left: 15px;">pc端</label></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">岗位投入</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_4_1_1" onclick="btn_4_4_1_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_4_1_2" onclick="btn_4_4_1_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">核心功能</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_4_2_1" onclick="btn_4_4_2_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_4_2_2" onclick="btn_4_4_2_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button>
                                        <li id="app_upload"></li></div>
                                    <div class="layui-form-item" style="margin-bottom: 10px;">
                                        <label for="username" style="color: #F08080; padding-left: 15px;">公众号端</label></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">岗位投入</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_5_1_1" onclick="btn_4_5_1_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_5_1_2" onclick="btn_4_5_1_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">核心功能</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_5_2_1" onclick="btn_4_5_2_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_5_2_2" onclick="btn_4_5_2_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button>
                                        <li id="app_upload"></li></div>

                                    <div class="layui-form-item-small" style="margin-bottom: 5px;">
                                        <label class="layui-form-label" style="padding-top: 10px;">
                                            <span style="font-size: 15px; color: green ;">接口层</span></label></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">岗位投入</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_6_1_1" onclick="btn_4_6_1_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_6_1_2" onclick="btn_4_6_1_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">核心功能</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_6_2_1" onclick="btn_4_6_2_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_6_2_2" onclick="btn_4_6_2_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item-small" style="margin-bottom: 5px;">
                                        <label class="layui-form-label" style="padding-top: 10px;">
                                            <span style="font-size: 15px; color: green ;">服务层</span></label></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">岗位投入</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_7_1_1" onclick="btn_4_7_1_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_7_1_2" onclick="btn_4_7_1_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <div class="layui-form-item" style="margin-bottom: 5px;">
                                        <label class="layui-form-label">
                                            <span style="font-size: 14px;">核心功能</label></span>
                                        <button class="layui-btn layui-btn-normal" id="btn_4_7_2_1" onclick="btn_4_7_2_1()">
                                            <i class="iconfont">&#xe6a2;</i> 详情</button><span style="padding-left: 50px;" ></span>
                                        <button class="layui-btn" id="btn_4_7_2_2" onclick="btn_4_7_2_2()">
                                            <i class="iconfont">&#xe69e;</i> 编辑</button></div>
                                    <hr style="height:1px; color: #C0C0C0;" /></div>
    <div class="layui-form-item">
        <div class="layui-btn-group">
            <button class="layui-btn layui-btn-lg" id="btn_send_riend"  style="width: 150px;"><i class="iconfont">&#xe726; </i> 转发给好友</button>
            <button class="layui-btn layui-btn-lg layui-btn-danger" id="shareUrl"  style="width: 150px;"><i class="iconfont">&#xe71d; </i> 生成转发链接</button>
            <button class="layui-btn layui-btn-lg layui-btn-normal"  lay-submit lay-filter="confirm_table" id="btn_confirm"  style="width: 150px;"><i class="iconfont">&#xe71d; </i> 确认合同</button></div></div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </body>
    <script>
        $('#shareUrl').on("click",function () {
            layui.use('form', function() {
                var form = layui.form;
                $.ajax({
                    url: "/contract/goEdit",
                    dateType: "json",
                    type: "get",
                    data: {level1SystemId: tableId},
                    success: function (info) {
                        if (info.msg == 'success') {
                            if (info.code == '已确认') {
                                layer.msg('合同已被确认！页面即将跳转！ ');
                                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                                setTimeout(
                                    function(){
                                        parent.layer.close(index);//关闭弹出的子页面窗口*!/
                                    },1000)
                                setTimeout(
                                    function(){
                                        location.href = 'table-finish-list.html';
                                        var id  = $(this).parent().attr('lay-id');
                                        xadmin.del_data(id);
                                        xadmin.add_tab('已确认合同', 'table-finish-list.html')
                                    },2000)
                            }
                            else if (info.code == '已转发未确认') {
                                layer.msg('合同已被接收！页面即将跳转！ ');
                                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                                setTimeout(
                                    function(){
                                        parent.layer.close(index);//关闭弹出的子页面窗口*!/
                                    },1000)
                                setTimeout(
                                    function(){
                                        location.href = 'table-finish-list.html';
                                        var id  = $(this).parent().attr('lay-id');
                                        xadmin.del_data(id);
                                        xadmin.add_tab('已转发未确认合同', 'table-being-list.html')
                                    },2000)
                            }
                            else {
                                var url = './shareUrl.html?tableId=' + $('#tableId').val()
                                xadmin.open('生成转发链接', url, 500, 280);
                            }
                        } else {
                            layer.msg('打开失败');
                        }
                    }
                })
            })
        })
    </script>

    <script>
        $('#btn_send_riend').on("click",function () {
            layui.use('form', function() {
                var form = layui.form;
                $.ajax({
                    url: "/contract/goEdit",
                    dateType: "json",
                    type: "get",
                    data: {level1SystemId: tableId},
                    success: function (info) {
                        if (info.msg == 'success') {
                            if (info.code == '已确认') {
                                layer.msg('合同已被确认！页面即将跳转！ ');
                                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                                setTimeout(
                                    function(){
                                        parent.layer.close(index);//关闭弹出的子页面窗口*!/
                                    },700)
                                setTimeout(
                                    function(){
                                        location.href = 'table-finish-list.html';
                                        var id  = $(this).parent().attr('lay-id');
                                        xadmin.del_data(id);
                                        xadmin.add_tab('已确认合同', 'table-finish-list.html')
                                    },1000)
                            }
                            else if (info.code == '已转发未确认'){
                                layer.msg('合同已被接收！页面即将跳转！ ');
                                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                                setTimeout(
                                    function(){
                                        parent.layer.close(index);//关闭弹出的子页面窗口*!/
                                    },700)
                                setTimeout(
                                    function(){
                                        location.href = 'table-finish-list.html';
                                        var id  = $(this).parent().attr('lay-id');
                                        xadmin.del_data(id);
                                        xadmin.add_tab('已转发未确认合同', 'table-being-list.html')
                                    },1000)
                            }
                            else {
                                var lay_id = $(window.frameElement).attr('tab-id');
                                var a = GetRequest();
                                var show_lay_id = a['show_lay_id'];
                                var url = './send-list.html?tableId=' + $('#tableId').val() + '&creater=' + sessionStorage.getItem("loginId") + '&lay_id=' + lay_id + '&show_lay_id=' + show_lay_id;
                                xadmin.open('转发给好友', url, 850, 600);
                            }
                        } else {
                            layer.msg('打开失败');
                        }
                    }
                })
            })
        })
    </script>

    <script>
        $(function  () {
            layui.use('form', function(){
                var form = layui.form;
                form.on('submit(confirm_table)', function(data){
                    $.ajax({
                        url: "/contract/goEdit",
                        dateType: "json",
                        type: "get",
                        data: {level1SystemId: tableId},
                        success: function(info) {
                            console.log(info)
                            if(info.msg == 'success') {
                                if(info.code == '已确认') {
                                    layer.msg('合同已被确认！页面即将跳转！ ');
                                    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                                    setTimeout(
                                        function(){
                                            parent.layer.close(index);//关闭弹出的子页面窗口*!/
                                        },700)
                                    setTimeout(
                                        function(){
                                            location.href = 'table-finish-list.html';
                                            var id  = $(this).parent().attr('lay-id');
                                            xadmin.del_data(id);
                                            xadmin.add_tab('已确认合同', 'table-finish-list.html')
                                        },1000)
                                }
                                else if(info.code == '已转发未确认'){
                                    layer.msg('合同已被接收！页面即将跳转！ ');
                                    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                                    setTimeout(
                                        function(){
                                            parent.layer.close(index);//关闭弹出的子页面窗口*!/
                                        },700)
                                    setTimeout(
                                        function(){
                                            location.href = 'table-finish-list.html';
                                            var id  = $(this).parent().attr('lay-id');
                                            xadmin.del_data(id);
                                            xadmin.add_tab('已转发未确认合同', 'table-being-list.html')
                                        },1000)
                                }
                                else {
                                    layer.confirm('是否要确定合同?', {icon: 3, title:'警告'}, function(index) {
                                        $.ajax({
                                            url: "/contract/confirm",
                                            dateType: "json",
                                            type: "get",
                                            data: {level1SystemId: tableId},
                                            success: function(res) {
                                                if(res.msg == 'success') {
                                                    layer.msg("确定成功！ 页面即将跳转！ ");
                                                    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                                                    setTimeout(
                                                        function(){
                                                            parent.layer.close(index);//关闭弹出的子页面窗口*!/
                                                        },700)
                                                    setTimeout(
                                                        function(){
                                                            layer.close(index);
                                                            location.href = 'table-finish-list.html';
                                                            var id  = $(this).parent().attr('lay-id');
                                                            xadmin.del_data(id);
                                                            xadmin.add_tab('已确认合同', 'table-finish-list.html')
                                                        },1000)
                                                } else {
                                                    layer.msg('确定失败');
                                                }
                                            }
                                        });
                                    });
                                }
                            } else {
                                layer.msg('确定失败');
                            }
                        }
                    })
                    return false;
                });
            });
        })
    </script>
    <script>layui.use(['form','code'], function(){
        var form = layui.form;
    });</script>

    <script>
        function GetRequest() {
            var url = location.search; //获取url中"?"符后的字串
            var theRequest = new Object();
            if (url.indexOf("?") != -1) {
                var str = url.substr(1);
                strs = str.split("&");
                for (var i = 0; i < strs.length; i++) {
                    theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
                }
            }
            return theRequest;
        }
        var a = GetRequest();
        var xqdyCpjl = a['xqdyCpjl'];
        var xqdyXqfxs = a['xqdyXqfxs'];
        if(xqdyCpjl != 1 && xqdyXqfxs != 1) {
            $('#btn_2_1_1').attr("disabled", true);
            $('#btn_2_1_2').attr("disabled", true);
        }
        var xtsjCpjl=a['xtsjCpjl'];
        var xtsjYyjgsjs=a['xtsjYyjgsjs'];
        var xtsjJcptsjs=a['xtsjJcptsjs'];
        var xtsjKhdapisjs=a['xtsjKhdapisjs'];
        var xtsjQdsjfxs=a['xtsjQdsjfxs'];
        var xtsjUisjs=a['xtsjUisjs'];
        if(xtsjCpjl != 1 && xtsjYyjgsjs != 1 && xtsjJcptsjs != 1 && xtsjKhdapisjs != 1 && xtsjQdsjfxs != 1 && xtsjUisjs !=1) {
            $('#btn_2_2_1').attr("disabled", true);
            $('#btn_2_2_2').attr("disabled", true);
        }
        var xtkfJavayfgcs=a['xtkfJavayfgcs'];
        var xtkfAzkfgcs=a['xtkfAzkfgcs'];
        var xtkfPgkfgcs=a['xtkfPgkfgcs'];
        var xtkfCkfgcs=a['xtkfCkfgcs'];
        var xtkfQdkfgcs=a['xtkfQdkfgcs'];
        if(xtkfJavayfgcs != 1 && xtkfAzkfgcs != 1 && xtkfPgkfgcs != 1 && xtkfCkfgcs != 1 && xtkfQdkfgcs != 1) {
            $('#btn_2_3_1').attr("disabled", true);
            $('#btn_2_3_2').attr("disabled", true);
        }
        var xtcsCsgcs = a['xtcsCsgcs'];
        if(xtcsCsgcs != 1) {
            $('#btn_2_4_1').attr("disabled", true);
            $('#btn_2_4_2').attr("disabled", true);
        }
        var ywzcYwjl = a['ywzcYwjl'];
        if(ywzcYwjl != 1) {
            $('#btn_2_5_1').attr("disabled", true);
            $('#btn_2_5_2').attr("disabled", true);
        }
        var xtssSsgcs = a['xtssSsgcs'];
        if(xtssSsgcs != 1) {
            $('#btn_2_6_1').attr("disabled", true);
            $('#btn_2_6_2').attr("disabled", true);
        }
        var xmglXmzj = a['xmglXmzj'];
        if(xmglXmzj != 1) {
            $('#btn_2_7_1').attr("disabled", true);
            $('#btn_2_7_2').attr("disabled", true);
        }
        var tableId=a['tableId'];
        var jsglJszj = a['jsglJszj'];
        if(jsglJszj != 1) {
            $('#btn_2_8_1').attr("disabled", true);
            $('#btn_2_8_2').attr("disabled", true);
        }

        var jcptCpjl = a['jcptCpjl'];
        var jcptXqfxs = a['jcptXqfxs'];
        var jcptYyjgsjs=a['jcptYyjgsjs'];
        var jcptJcptsjs=a['jcptJcptsjs'];
        var jcptKhdapisjs=a['jcptKhdappsjs'];
        var jcptQdsjfxs=a['jcptQdsjsjs'];
        var jcptUisjs=a['jcptUisjs'];
        var jcptJavayfgcs=a['jcptJavayfgcs'];
        var jcptAzkfgcs=a['jcptAzkfgcs'];
        var jcptPgkfgcs=a['jcptPgkfgcs'];
        var jcptCkfgcs=a['jcptCkfgcs'];
        var jcptQdkfgcs=a['jcptQdkfgcs'];
        var jcptCsgcs = a['jcptCsgcs'];
        if(jcptCpjl != 1 && jcptXqfxs != 1 && jcptYyjgsjs != 1 && jcptJcptsjs != 1 && jcptKhdapisjs != 1 && jcptQdsjfxs != 1 && jcptUisjs != 1 && jcptJavayfgcs != 1 && jcptAzkfgcs != 1 && jcptPgkfgcs != 1 && jcptCkfgcs != 1 && jcptQdkfgcs != 1 && jcptCsgcs == 1) {
            $('#btn_3_1_1_1').attr("disabled", true);
            $('#btn_3_1_1_2').attr("disabled", true);
            $('#btn_3_1_2_1').attr("disabled", true);
            $('#btn_3_1_2_2').attr("disabled", true);
        }
        var jkcCpjl = a['jkcCpjl'];
        var jkcXqfxs = a['jkcXqfxs'];
        var jkcYyjgsjs=a['jkcYyjgsjs'];
        var jkcJcptcsjs=a['jkcJcptcsjs'];
        var jkcKhdapisjs=a['jkcKhdappsjs'];
        var jkcQdsjfxs=a['jkcQdsjsjs'];
        var jkcUisjs=a['jkcUisjs'];
        var jkcJavayfgcs=a['jkcJavayfgcs'];
        var jkcAzkfgcs=a['jkcAzkfgcs'];
        var jkcPgkfgcs=a['jkcPgkfgcs'];
        var jkcCkfgcs=a['jkcCkfgcs'];
        var jkcQdkfgcs=a['jkcQdkfgcs'];
        var jkcCsgcs = a['jkcCsgcs'];
        if(jkcCpjl != 1 && jkcXqfxs != 1 && jkcYyjgsjs != 1 && jkcJcptcsjs != 1 && jkcKhdapisjs != 1 && jkcQdsjfxs != 1 && jkcUisjs != 1 && jkcJavayfgcs != 1 && jkcAzkfgcs != 1 && jkcPgkfgcs != 1 && jkcCkfgcs != 1 && jkcQdkfgcs != 1 && jkcCsgcs == 1) {
            $('#btn_4_6_1_1').attr("disabled", true);
            $('#btn_4_6_1_2').attr("disabled", true);
            $('#btn_4_6_2_1').attr("disabled", true);
            $('#btn_4_6_2_2').attr("disabled", true);
        }
        var yycCpjl=a['yycCpjl'];
        var yycXqfxs=a['yycXqfxs'];
        var yycYyjgsjs=a['yycYyjgsjs'];
        var yycJcptsjs=a['yycJcptsjs'];
        var yycKhdapisjs=a['yycKhdappsjs'];
        var yycQdsjfxs=a['yycQdsjsjs'];
        var yycUisjs=a['yycUisjs'];
        var yycJavayfgcs=a['yycJavayfgcs'];
        var yycAzkfgcs=a['yycAzkfgcs'];
        var yycPgkfgcs=a['yycPgkfgcs'];
        var yycCkfgcs=a['yycCkfgcs'];
        var yycQdkfgcs=a['yycQdkfgcs'];
        var yycCsgcs = a['yycCsgcs'];
        if(yycCpjl != 1 && yycXqfxs != 1 && yycYyjgsjs != 1 && yycJcptsjs != 1 && yycKhdapisjs != 1 && yycQdsjfxs != 1 && yycUisjs != 1 && yycJavayfgcs != 1 && yycAzkfgcs != 1 && yycPgkfgcs != 1 && yycCkfgcs != 1 && yycQdkfgcs != 1 && yycCsgcs == 1) {
            $('#btn_4_1_1_1').attr("disabled", true);
            $('#btn_4_1_1_2').attr("disabled", true);
            $('#btn_4_1_2_1').attr("disabled", true);
            $('#btn_4_1_2_2').attr("disabled", true);
            $('#btn_4_2_1_1').attr("disabled", true);
            $('#btn_4_2_1_2').attr("disabled", true);
            $('#btn_4_2_2_1').attr("disabled", true);
            $('#btn_4_2_2_2').attr("disabled", true);
            $('#btn_4_3_1_1').attr("disabled", true);
            $('#btn_4_3_1_2').attr("disabled", true);
            $('#btn_4_3_2_1').attr("disabled", true);
            $('#btn_4_3_2_2').attr("disabled", true);
            $('#btn_4_4_1_1').attr("disabled", true);
            $('#btn_4_4_1_2').attr("disabled", true);
            $('#btn_4_4_2_1').attr("disabled", true);
            $('#btn_4_4_2_2').attr("disabled", true);
            $('#btn_4_5_1_1').attr("disabled", true);
            $('#btn_4_5_1_2').attr("disabled", true);
            $('#btn_4_5_2_1').attr("disabled", true);
            $('#btn_4_5_2_2').attr("disabled", true);
        }
        var fwcCpjl = a['fwcCpjl'];
        var fwcXqfxs = a['fwcXqfxs'];
        var fwcYyjgsjs=a['fwcYyjgsjs'];
        var fwcJcptsjs=a['fwcJcptsjs'];
        var fwcKhdapisjs=a['fwcKhdappsjs'];
        var fwcQdsjfxs=a['fwcQdsjsjs'];
        var fwcUisjs=a['fwcUisjs'];
        var fwcJavayfgcs=a['fwcJavayfgcs'];
        var fwcAzkfgcs=a['fwcAzkfgcs'];
        var fwcPgkfgcs=a['fwcPgkfgcs'];
        var fwcCkfgcs=a['fwcCkfgcs'];
        var fwcQdkfgcs=a['fwcQdkfgcs'];
        var fwcCsgcs = a['fwcCsgcs'];
        if(fwcCpjl != 1 && fwcXqfxs != 1 && fwcYyjgsjs != 1 && fwcJcptsjs != 1 && fwcKhdapisjs != 1 && fwcQdsjfxs != 1 && fwcUisjs != 1 && fwcJavayfgcs != 1 && fwcAzkfgcs != 1 && fwcPgkfgcs != 1 && fwcCkfgcs != 1 && fwcQdkfgcs != 1 && fwcCsgcs == 1) {
            $('#btn_3_1_1_1').attr("disabled", true);
            $('#btn_3_1_1_2').attr("disabled", true);
            $('#btn_3_1_2_1').attr("disabled", true);
            $('#btn_3_1_2_2').attr("disabled", true);
        }
        layui.use(['form','code','laydate'], function(){
            var laydate = layui.laydate;
            //执行一个laydate实例
            laydate.render({
              elem: '#deadline' //指定元素
            });
            form = layui.form;
            layui.code();
            $('#site').xcity('','','');

            var a=GetRequest();
            var tableid = a['tableId'];
            $('#tableId').val(tableid);
            var modeId = a['modeId'];
            $('modeId').val(modeId);
            var newT = a['newT'];

            form.on('submit(btn-submit)', function(data){//提交数据
                //console.log(data.elem) //被执行事件的元素DOM对象，一般为button对象
                //console.log(data.form) //被执行提交的form对象，一般在存在form标签时才会返回
                //console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}
                console.log("提交:  " + JSON.stringify(data.field));
                var areaArrTemp = new Array();
                areaArrTemp.push(data.field.province);
                areaArrTemp.push(data.field.city);
                areaArrTemp.push(data.field.area);
                areaArrTemp.push(data.field.street);
                var arrText = areaArrTemp.join('-');
                //console.log(arrText);
                $.ajax({
                    type:'post',
                    dateType: "json",
                    contentType : "application/json",
                    url: '/contract/saveSystem1',
                    data:
                        JSON.stringify({
                            level1SystemId: data.field.tableId,
                            //"modeId: modeId,
                            projectName: data.field.projectName,
                            customerName: data.field.businessName,
                            headName: data.field.chiefName,
                            headPhone: data.field.chiefPhone,
                            headEmail: data.field.chiefEmail,
                            deliveryTime: data.field.deadline,
                            deliverables: data.field.content,
                            deliveryWay: data.field.method,
                            deliveryPlace : arrText
                        }),
                     success: function(res) {
                        // var res = JSON.parse(val);
                        if(res.msg == 'success') {
                            layer.msg("保存数据成功");
                        } else {
                            layer.msg('保存数据失败');
                        }
                    }
                });
                return false;//阻止表单跳转。如果需要表单跳转，去掉这段即可。
            });

            //初始化:接收数据
            if(tableId && newT!=0){
                $.ajax({
                    url: "/contract/findSystem1",
                    type: "get",
                    dateType: "json",
                    data:{
                            level1SystemId : tableid
                        },
                    success: function(res) {
                        // var res = JSON.parse(val);
                        console.log(res);
                        if(!res.data.level1System.level1SystemId) {
                            res.data.level1System.level1SystemId = tableid;
                        }
                        if(res.msg == 'success') {
                            layer.msg("加载数据成功");
                            form.val('firstTable', {
                                "tableId": res.data.level1System.level1SystemId,
                                "modeId": res.data.level1System.modeId,
                                "projectName": res.data.level1System.projectName,
                                "businessName": res.data.level1System.customerName,
                                "chiefName": res.data.level1System.headName,
                                "chiefPhone": res.data.level1System.headPhone,
                                "chiefEmail": res.data.level1System.headEmail,
                                "deadline": res.data.level1System.deliveryTime,
                                "content": res.data.level1System.deliverables,
                                "method": res.data.level1System.deliveryWay
                            });
                            if(res.data.level1System.deliveryPlace != null && res.data.level1System.deliverPlace !== '' && res.data.level1System.deliveryPlace != 'undefined') {
                                var areaArr = res.data.level1System.deliveryPlace.split('-');
                                $('#site').xcity(areaArr[0], areaArr[1], areaArr[2]);
                                if(areaArr.length > 3)
                                    $('#street').val(areaArr[3]);
                            }
                        } else {
                            layer.msg('加载数据失败');
                        }
                    }
                });
            }
    });</script>
</html>